package com.geekaca.iobuffer;

import org.apache.commons.io.IOUtils;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class TestComonsIO {
    public static void main(String[] args) {
        /**
         * 学习commons-io库
         */
        // 1, 文件的复制
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("D:\\Users\\Peter\\Desktop\\less_use\\test_studying " +
                    "files\\folders\\career\\01-1 试卷A.docx");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        try {
            IOUtils.copy(fis,new FileOutputStream("studyIOBuffer\\7-5.docx"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
